package com.shuo.service;

import com.shuo.model.User;

import java.util.List;

/**
 * Created by linshuo on 2018/3/27.
 */
public interface UserService {
    long add(User user);

    long update(User user);

    long delete(long id);

    List<User> listAll();

    Long count();

    Long countBy(String field, Object value);

    long deleteBy(String field, Object value);

    User get(Long id);

    User getBy(String field, Object value);

    User getByAnd(String field1, Object value1, String field2, Object value2);

    User getByOr(String field1, Object value1, String field2, Object value2);

    List<User> listBy(String field, Object value);

    List<User> listByAnd(String field1, Object value1, String field2, Object value2);

    List<User> listByOr(String field1, Object value1, String field2, Object value2);
}
